﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*********************************************************
 * 命名空间 MDT.FlueCuredTobaccoPlatform.Common.Extensions.Convert
 * 接口名称 MapToAttribute
 * 开发人员：zdm
 * 创建时间：2023/9/14 10:45:59
 * 描述说明：
 * 更改历史：
 * 
 * *******************************************************/
namespace Simple.Tools
{
	/// <summary>
	/// 
	/// </summary>
	[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
	public class MapToAttribute:Attribute
	{
		private bool _isConvert;
		private Type targetType;
		/// <summary>
		/// 
		/// </summary>
		/// <param name="targetType"></param>
		/// <param name="IsConvert"></param>
		public MapToAttribute(Type targetType ,bool IsConvert= true) :this(IsConvert)
		{
			this.targetType = targetType;
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="IsConvert"></param>
		public MapToAttribute(bool IsConvert = true)
		{
		 _isConvert = IsConvert;
		}

		/// <summary>
		/// 
		/// </summary>
		public bool IsConvert { get { return _isConvert; } set { _isConvert = value; } }
		/// <summary>
		/// 
		/// </summary>
        public Type TargetType { get { return targetType; } set { targetType = value; } }
    }
}
